#include "server.h"
#include "../common/socketop.h"

Server::Server(const std::string& logname):logger_name(logname)
{
	this->logger = new Logger(this->logger_name + ".log", "server", true, true);
	this->logger->Log( this->logger_name + " init over");
	this->sockfd = sockets::Socket(AF_INET);
}

Server::~Server()
{
	sockets::Close(this->sockfd);
}

void Server::run()
{
	while (1)
	{
		this->logger->Log("just run in it");
		usleep(100);
	}
	
}